moduleAplicacao.directive('datepicker', function() {
    return {
        restrict: 'A',
        require : 'ngModel',
        link : function (scope, el, attr, ngModel) {
            $(el).datetimepicker({
                timeFormat: 'HH:mm:ss',
                hourText: 'Hora',
                minuteText: 'Minuto',
                secondText: 'Segundo',
                dateFormat: 'dd/mm/yy',
                timezoneText: 'fuso horário',
                closeText: 'Fechar',
                currentText: 'Hoje',
                timeText: 'Horário',
                onSelect: function(dateText) {
                  scope.$apply(function() {
                    ngModel.$setViewValue(dateText);
                  });
                }
              });
        }
    }
});